<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>gdsl: 2D-Arrays manipulation module</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">gdsl
   &#160;<span id="projectnumber">1.7</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('group__gdsl__2darray.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">2D-Arrays manipulation module</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct gdsl_2darray *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GDSL 2D-array type.  <a href="#gac57888c23d8aa9d6e16f6be67ea149a8"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__2darray.html#ga0bb00b11d1705236a70c4787670ee2c3">gdsl_2darray_alloc</a> (const char *NAME, const <a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> R, const <a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> C, const <a class="el" href="group__gdsl__types.html#ga32a9b4e8b9665183c2741d28a5ced64f">gdsl_alloc_func_t</a> ALLOC_F, const <a class="el" href="group__gdsl__types.html#ga2c6b3f96b291b5b39d2799f93e350053">gdsl_free_func_t</a> FREE_F)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new 2D-array.  <a href="#ga0bb00b11d1705236a70c4787670ee2c3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__2darray.html#gadd88f34b133a6b49e257567a57fbff0b">gdsl_2darray_free</a> (<a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a> A)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy a 2D-array.  <a href="#gadd88f34b133a6b49e257567a57fbff0b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__2darray.html#ga43fecb137d5a152c8bd1310b93e14401">gdsl_2darray_get_name</a> (const <a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a> A)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the name of a 2D-array.  <a href="#ga43fecb137d5a152c8bd1310b93e14401"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__2darray.html#ga26492a4c0714888029b1691994a33998">gdsl_2darray_get_rows_number</a> (const <a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a> A)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of rows of a 2D-array.  <a href="#ga26492a4c0714888029b1691994a33998"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__2darray.html#gad5f3ca5120e902ed23204bd52440d463">gdsl_2darray_get_columns_number</a> (const <a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a> A)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of columns of a 2D-array.  <a href="#gad5f3ca5120e902ed23204bd52440d463"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__2darray.html#gaee2aa4a8f7112592ee19f3387d543b25">gdsl_2darray_get_size</a> (const <a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a> A)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the size of a 2D-array.  <a href="#gaee2aa4a8f7112592ee19f3387d543b25"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__2darray.html#ga0aadae9c7329a7d0bf15867b7c344f5d">gdsl_2darray_get_content</a> (const <a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a> A, const <a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> R, const <a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> C)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get an element from a 2D-array.  <a href="#ga0aadae9c7329a7d0bf15867b7c344f5d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__2darray.html#ga6fb07f6368cc60fa9a05e86338fa3e1d">gdsl_2darray_set_name</a> (<a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a> A, const char *NEW_NAME)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the name of a 2D-array.  <a href="#ga6fb07f6368cc60fa9a05e86338fa3e1d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__2darray.html#ga0fa94bb086b0e0a7089ec88c2998ce27">gdsl_2darray_set_content</a> (<a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a> A, const <a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> R, const <a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> C, void *VALUE)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Modify an element in a 2D-array.  <a href="#ga0fa94bb086b0e0a7089ec88c2998ce27"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__2darray.html#gaf3f55d704d6d4323c078c828441a155e">gdsl_2darray_write</a> (const <a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a> A, const <a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a> WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Write the content of a 2D-array to a file.  <a href="#gaf3f55d704d6d4323c078c828441a155e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__2darray.html#gac21cb1bc98ae0c4183cba13bb78d5f5b">gdsl_2darray_write_xml</a> (const <a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a> A, const <a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a> WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Write the content of a 2D array to a file into XML.  <a href="#gac21cb1bc98ae0c4183cba13bb78d5f5b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__2darray.html#gaf66c650d8d7fd36021dcec21c6186aa1">gdsl_2darray_dump</a> (const <a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a> A, const <a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a> WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Dump the internal structure of a 2D array to a file.  <a href="#gaf66c650d8d7fd36021dcec21c6186aa1"></a><br/></td></tr>
</table>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="gac57888c23d8aa9d6e16f6be67ea149a8"></a><!-- doxytag: member="gdsl_2darray.h::gdsl_2darray_t" ref="gac57888c23d8aa9d6e16f6be67ea149a8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct gdsl_2darray* <a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>GDSL 2D-array type. </p>
<p>This type is voluntary opaque. Variables of this kind could'nt be directly used, but by the functions of this module. </p>

<p>Definition at line <a class="el" href="gdsl__2darray_8h_source.html#l00053">53</a> of file <a class="el" href="gdsl__2darray_8h_source.html">gdsl_2darray.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga0bb00b11d1705236a70c4787670ee2c3"></a><!-- doxytag: member="gdsl_2darray.h::gdsl_2darray_alloc" ref="ga0bb00b11d1705236a70c4787670ee2c3" args="(const char *NAME, const ulong R, const ulong C, const gdsl_alloc_func_t ALLOC_F, const gdsl_free_func_t FREE_F)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a> <a class="el" href="group__gdsl__2darray.html#ga0bb00b11d1705236a70c4787670ee2c3">gdsl_2darray_alloc</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>NAME</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>&#160;</td>
          <td class="paramname"><em>R</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>&#160;</td>
          <td class="paramname"><em>C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#ga32a9b4e8b9665183c2741d28a5ced64f">gdsl_alloc_func_t</a>&#160;</td>
          <td class="paramname"><em>ALLOC_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#ga2c6b3f96b291b5b39d2799f93e350053">gdsl_free_func_t</a>&#160;</td>
          <td class="paramname"><em>FREE_F</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a new 2D-array. </p>
<p>Allocate a new 2D-array data structure with R rows and C columns and its name is set to a copy of NAME. The functions pointers ALLOC_F and FREE_F could be used to respectively, alloc and free elements in the 2D-array. These pointers could be set to NULL to use the default ones:</p>
<ul>
<li>the default ALLOC_F simply returns its argument</li>
<li>the default FREE_F does nothing</li>
</ul>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>nothing </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">NAME</td><td>The name of the new 2D-array to create </td></tr>
    <tr><td class="paramname">R</td><td>The number of rows of the new 2D-array to create </td></tr>
    <tr><td class="paramname">C</td><td>The number of columns of the new 2D-array to create </td></tr>
    <tr><td class="paramname">ALLOC_F</td><td>Function to alloc element when inserting it in a 2D-array </td></tr>
    <tr><td class="paramname">FREE_F</td><td>Function to free element when removing it from a 2D-array </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the newly allocated 2D-array in case of success. </dd>
<dd>
NULL in case of insufficient memory. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__2darray.html#gadd88f34b133a6b49e257567a57fbff0b" title="Destroy a 2D-array.">gdsl_2darray_free()</a> </dd>
<dd>
<a class="el" href="group__gdsl__types.html#ga32a9b4e8b9665183c2741d28a5ced64f" title="GDSL Alloc element function type.">gdsl_alloc_func_t</a> </dd>
<dd>
<a class="el" href="group__gdsl__types.html#ga2c6b3f96b291b5b39d2799f93e350053" title="GDSL Free element function type.">gdsl_free_func_t</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gadd88f34b133a6b49e257567a57fbff0b"></a><!-- doxytag: member="gdsl_2darray.h::gdsl_2darray_free" ref="gadd88f34b133a6b49e257567a57fbff0b" args="(gdsl_2darray_t A)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__gdsl__2darray.html#gadd88f34b133a6b49e257567a57fbff0b">gdsl_2darray_free</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a>&#160;</td>
          <td class="paramname"><em>A</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destroy a 2D-array. </p>
<p>Flush and destroy the 2D-array A. The FREE_F function passed to <a class="el" href="group__gdsl__2darray.html#ga0bb00b11d1705236a70c4787670ee2c3" title="Create a new 2D-array.">gdsl_2darray_alloc()</a> is used to free elements from A, but no check is done to see if an element was set (ie. != NULL) or not.It's up to you to check if the element to free is NULL or not into the FREE_F function.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( R x C ), where R is A's rows count, and C is A's columns count </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>A must be a valid gdsl_2darray_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">A</td><td>The 2D-array to destroy </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__2darray.html#ga0bb00b11d1705236a70c4787670ee2c3" title="Create a new 2D-array.">gdsl_2darray_alloc()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga43fecb137d5a152c8bd1310b93e14401"></a><!-- doxytag: member="gdsl_2darray.h::gdsl_2darray_get_name" ref="ga43fecb137d5a152c8bd1310b93e14401" args="(const gdsl_2darray_t A)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* <a class="el" href="group__gdsl__2darray.html#ga43fecb137d5a152c8bd1310b93e14401">gdsl_2darray_get_name</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a>&#160;</td>
          <td class="paramname"><em>A</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the name of a 2D-array. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>A must be a valid gdsl_2darray_t </dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd>The returned string MUST NOT be freed. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">A</td><td>The 2D-array from which getting the name </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the name of the 2D-array A. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__2darray.html#ga6fb07f6368cc60fa9a05e86338fa3e1d" title="Set the name of a 2D-array.">gdsl_2darray_set_name()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga26492a4c0714888029b1691994a33998"></a><!-- doxytag: member="gdsl_2darray.h::gdsl_2darray_get_rows_number" ref="ga26492a4c0714888029b1691994a33998" args="(const gdsl_2darray_t A)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> <a class="el" href="group__gdsl__2darray.html#ga26492a4c0714888029b1691994a33998">gdsl_2darray_get_rows_number</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a>&#160;</td>
          <td class="paramname"><em>A</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the number of rows of a 2D-array. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>A must be a valid gdsl_2darray_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">A</td><td>The 2D-array from which getting the rows count </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of rows of the 2D-array A. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__2darray.html#gad5f3ca5120e902ed23204bd52440d463" title="Get the number of columns of a 2D-array.">gdsl_2darray_get_columns_number()</a> </dd>
<dd>
<a class="el" href="group__gdsl__2darray.html#gaee2aa4a8f7112592ee19f3387d543b25" title="Get the size of a 2D-array.">gdsl_2darray_get_size()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gad5f3ca5120e902ed23204bd52440d463"></a><!-- doxytag: member="gdsl_2darray.h::gdsl_2darray_get_columns_number" ref="gad5f3ca5120e902ed23204bd52440d463" args="(const gdsl_2darray_t A)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> <a class="el" href="group__gdsl__2darray.html#gad5f3ca5120e902ed23204bd52440d463">gdsl_2darray_get_columns_number</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a>&#160;</td>
          <td class="paramname"><em>A</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the number of columns of a 2D-array. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>A must be a valid gdsl_2darray_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">A</td><td>The 2D-array from which getting the columns count </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of columns of the 2D-array A. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__2darray.html#ga26492a4c0714888029b1691994a33998" title="Get the number of rows of a 2D-array.">gdsl_2darray_get_rows_number()</a> </dd>
<dd>
<a class="el" href="group__gdsl__2darray.html#gaee2aa4a8f7112592ee19f3387d543b25" title="Get the size of a 2D-array.">gdsl_2darray_get_size()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gaee2aa4a8f7112592ee19f3387d543b25"></a><!-- doxytag: member="gdsl_2darray.h::gdsl_2darray_get_size" ref="gaee2aa4a8f7112592ee19f3387d543b25" args="(const gdsl_2darray_t A)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> <a class="el" href="group__gdsl__2darray.html#gaee2aa4a8f7112592ee19f3387d543b25">gdsl_2darray_get_size</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a>&#160;</td>
          <td class="paramname"><em>A</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the size of a 2D-array. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>A must be a valid gdsl_2darray_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">A</td><td>The 2D-array to use. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of elements of A (noted |A|). </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__2darray.html#ga26492a4c0714888029b1691994a33998" title="Get the number of rows of a 2D-array.">gdsl_2darray_get_rows_number()</a> </dd>
<dd>
<a class="el" href="group__gdsl__2darray.html#gad5f3ca5120e902ed23204bd52440d463" title="Get the number of columns of a 2D-array.">gdsl_2darray_get_columns_number()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga0aadae9c7329a7d0bf15867b7c344f5d"></a><!-- doxytag: member="gdsl_2darray.h::gdsl_2darray_get_content" ref="ga0aadae9c7329a7d0bf15867b7c344f5d" args="(const gdsl_2darray_t A, const ulong R, const ulong C)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a> <a class="el" href="group__gdsl__2darray.html#ga0aadae9c7329a7d0bf15867b7c344f5d">gdsl_2darray_get_content</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a>&#160;</td>
          <td class="paramname"><em>A</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>&#160;</td>
          <td class="paramname"><em>R</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>&#160;</td>
          <td class="paramname"><em>C</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get an element from a 2D-array. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>A must be a valid gdsl_2darray_t &amp; R &lt;= gdsl_2darray_get_rows_number( A ) &amp; C &lt;= gdsl_2darray_get_columns_number( A ) </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">A</td><td>The 2D-array from which getting the element </td></tr>
    <tr><td class="paramname">R</td><td>The row indix of the element to get </td></tr>
    <tr><td class="paramname">C</td><td>The column indix of the element to get </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the element of the 2D-array A contained in row R and column C. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__2darray.html#ga0fa94bb086b0e0a7089ec88c2998ce27" title="Modify an element in a 2D-array.">gdsl_2darray_set_content()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga6fb07f6368cc60fa9a05e86338fa3e1d"></a><!-- doxytag: member="gdsl_2darray.h::gdsl_2darray_set_name" ref="ga6fb07f6368cc60fa9a05e86338fa3e1d" args="(gdsl_2darray_t A, const char *NEW_NAME)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a> <a class="el" href="group__gdsl__2darray.html#ga6fb07f6368cc60fa9a05e86338fa3e1d">gdsl_2darray_set_name</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a>&#160;</td>
          <td class="paramname"><em>A</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>NEW_NAME</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the name of a 2D-array. </p>
<p>Change the previous name of the 2D-array A to a copy of NEW_NAME.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>A must be a valid gdsl_2darray_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">A</td><td>The 2D-array to change the name </td></tr>
    <tr><td class="paramname">NEW_NAME</td><td>The new name of A </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the modified 2D-array in case of success. </dd>
<dd>
NULL in case of failure. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__2darray.html#ga43fecb137d5a152c8bd1310b93e14401" title="Get the name of a 2D-array.">gdsl_2darray_get_name()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga0fa94bb086b0e0a7089ec88c2998ce27"></a><!-- doxytag: member="gdsl_2darray.h::gdsl_2darray_set_content" ref="ga0fa94bb086b0e0a7089ec88c2998ce27" args="(gdsl_2darray_t A, const ulong R, const ulong C, void *VALUE)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a> <a class="el" href="group__gdsl__2darray.html#ga0fa94bb086b0e0a7089ec88c2998ce27">gdsl_2darray_set_content</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a>&#160;</td>
          <td class="paramname"><em>A</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>&#160;</td>
          <td class="paramname"><em>R</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>&#160;</td>
          <td class="paramname"><em>C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>VALUE</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Modify an element in a 2D-array. </p>
<p>Change the element at row R and column C of the 2D-array A, and returns it. The new element to insert is allocated using the ALLOC_F function passed to gdsl_2darray_create() applied on VALUE. The previous element contained in row R and in column C is NOT deallocated. It's up to you to do it before, if necessary.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>A must be a valid gdsl_2darray_t &amp; R &lt;= gdsl_2darray_get_rows_number( A ) &amp; C &lt;= gdsl_2darray_get_columns_number( A ) </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">A</td><td>The 2D-array to modify on element from </td></tr>
    <tr><td class="paramname">R</td><td>The row number of the element to modify </td></tr>
    <tr><td class="paramname">C</td><td>The column number of the element to modify </td></tr>
    <tr><td class="paramname">VALUE</td><td>The user value to use for allocating the new element </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the newly allocated element in case of success. </dd>
<dd>
NULL in case of insufficient memory. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__2darray.html#ga0aadae9c7329a7d0bf15867b7c344f5d" title="Get an element from a 2D-array.">gdsl_2darray_get_content()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gaf3f55d704d6d4323c078c828441a155e"></a><!-- doxytag: member="gdsl_2darray.h::gdsl_2darray_write" ref="gaf3f55d704d6d4323c078c828441a155e" args="(const gdsl_2darray_t A, const gdsl_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__gdsl__2darray.html#gaf3f55d704d6d4323c078c828441a155e">gdsl_2darray_write</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a>&#160;</td>
          <td class="paramname"><em>A</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a>&#160;</td>
          <td class="paramname"><em>WRITE_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>OUTPUT_FILE</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>USER_DATA</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write the content of a 2D-array to a file. </p>
<p>Write the elements of the 2D-array A to OUTPUT_FILE, using WRITE_F function. Additionnal USER_DATA argument could be passed to WRITE_F.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( R x C ), where R is A's rows count, and C is A's columns count </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>WRITE_F != NULL &amp; OUTPUT_FILE != NULL </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">A</td><td>The 2D-array to write </td></tr>
    <tr><td class="paramname">WRITE_F</td><td>The write function </td></tr>
    <tr><td class="paramname">OUTPUT_FILE</td><td>The file where to write A's elements </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>User's datas passed to WRITE_F </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__2darray.html#gac21cb1bc98ae0c4183cba13bb78d5f5b" title="Write the content of a 2D array to a file into XML.">gdsl_2darray_write_xml()</a> </dd>
<dd>
<a class="el" href="group__gdsl__2darray.html#gaf66c650d8d7fd36021dcec21c6186aa1" title="Dump the internal structure of a 2D array to a file.">gdsl_2darray_dump()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gac21cb1bc98ae0c4183cba13bb78d5f5b"></a><!-- doxytag: member="gdsl_2darray.h::gdsl_2darray_write_xml" ref="gac21cb1bc98ae0c4183cba13bb78d5f5b" args="(const gdsl_2darray_t A, const gdsl_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__gdsl__2darray.html#gac21cb1bc98ae0c4183cba13bb78d5f5b">gdsl_2darray_write_xml</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a>&#160;</td>
          <td class="paramname"><em>A</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a>&#160;</td>
          <td class="paramname"><em>WRITE_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>OUTPUT_FILE</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>USER_DATA</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write the content of a 2D array to a file into XML. </p>
<p>Write all A's elements to OUTPUT_FILE, into XML language. If WRITE_F != NULL, then uses WRITE_F to write A's elements to OUTPUT_FILE. Additionnal USER_DATA argument could be passed to WRITE_F.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( R x C ), where R is A's rows count, and C is A's columns count </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>A must be a valid gdsl_2darray_t &amp; OUTPUT_FILE != NULL </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">A</td><td>The 2D-array to write </td></tr>
    <tr><td class="paramname">WRITE_F</td><td>The write function </td></tr>
    <tr><td class="paramname">OUTPUT_FILE</td><td>The file where to write A's elements </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>User's datas passed to WRITE_F </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__2darray.html#gaf3f55d704d6d4323c078c828441a155e" title="Write the content of a 2D-array to a file.">gdsl_2darray_write()</a> </dd>
<dd>
<a class="el" href="group__gdsl__2darray.html#gaf66c650d8d7fd36021dcec21c6186aa1" title="Dump the internal structure of a 2D array to a file.">gdsl_2darray_dump()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gaf66c650d8d7fd36021dcec21c6186aa1"></a><!-- doxytag: member="gdsl_2darray.h::gdsl_2darray_dump" ref="gaf66c650d8d7fd36021dcec21c6186aa1" args="(const gdsl_2darray_t A, const gdsl_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__gdsl__2darray.html#gaf66c650d8d7fd36021dcec21c6186aa1">gdsl_2darray_dump</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__2darray.html#gac57888c23d8aa9d6e16f6be67ea149a8">gdsl_2darray_t</a>&#160;</td>
          <td class="paramname"><em>A</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a>&#160;</td>
          <td class="paramname"><em>WRITE_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>OUTPUT_FILE</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>USER_DATA</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Dump the internal structure of a 2D array to a file. </p>
<p>Dump A's structure to OUTPUT_FILE. If WRITE_F != NULL, then uses WRITE_F to write A's elements to OUTPUT_FILE. Additionnal USER_DATA argument could be passed to WRITE_F.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( R x C ), where R is A's rows count, and C is A's columns count </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>A must be a valid gdsl_2darray_t &amp; OUTPUT_FILE != NULL </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">A</td><td>The 2D-array to dump </td></tr>
    <tr><td class="paramname">WRITE_F</td><td>The write function </td></tr>
    <tr><td class="paramname">OUTPUT_FILE</td><td>The file where to write A's elements </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>User's datas passed to WRITE_F </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__2darray.html#gaf3f55d704d6d4323c078c828441a155e" title="Write the content of a 2D-array to a file.">gdsl_2darray_write()</a> </dd>
<dd>
<a class="el" href="group__gdsl__2darray.html#gac21cb1bc98ae0c4183cba13bb78d5f5b" title="Write the content of a 2D array to a file into XML.">gdsl_2darray_write_xml()</a> </dd></dl>

</div>
</div>
</div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>

    <li class="footer">Generated on Wed Jun 12 2013 18:18:47 for gdsl by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
